<template>
  <div>
    <div class="col-xs-offset-2 col-xs-8">
      <div class="page-header">
        <h2>Vue Router Demo</h2>
        <button @click="back">后退</button>
        <button @click="forward">前进</button>
        <button @click="go">测试一下go</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "myBanner",
  methods: {
    back(){
       this.$router.back()
    },
    forward(){
      this.$router.forward()
    },
    go(){
      // (1) go api可以在括号里写 前进还是后退(正数还是复数) 几步
      this.$router.go(-2)
    }
  },
};
</script>

<style></style>
